//
//  oldBalance.h
//  laonianbang
//
//  Created by 勇拓 李 on 18/3/31.
//  Copyright © 2018年 zaiyou. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void ( ^ BalanceSuccessBlock ) ( id data);
typedef void ( ^ BalanceErrorBlock )( NSString * error);

typedef enum _PayType {
    WECHAT_PAY = 0,
    ALI_PAY,
    BALANCE_PAY,
} PayType;

#define BALANCE_SINGLETON [oldBalance shareInstance]

@interface oldBalance : NSObject

+ ( instancetype ) shareInstance;

- (NSString *)getBanlance;

- ( void ) requestBalanceSuccess : ( BalanceSuccessBlock ) successBlock
                        error : ( BalanceErrorBlock ) errorBlock;

- (void)AliPay:(NSString *)oid price:(NSString *)price type:(NSString *)type success:(BalanceSuccessBlock) successBlock error: ( BalanceErrorBlock ) errorBlock;

- (void)WechatPay:(NSString *)oid price:(NSString *)price type:(NSString *)type success:(BalanceSuccessBlock) successBlock error: ( BalanceErrorBlock ) errorBlock;

- (void)ConsumePay:(NSString *)oid success:(BalanceSuccessBlock) successBlock error : ( BalanceErrorBlock ) errorBlock;

@end
